for i in range(1, 10):
    for j in range(1, i + 1):
        print("{} × {} = {}".format(j, i, i * j), end="\t")
    print(end="\n")

print("=" * 100)

for m in range(9, 0, -1):
    for n in range(9, m - 1, -1):
        print("{} × {} = {}".format(n, m, n * m), end="\t")
    print(end="\n")

print("=" * 100)

for m in range(9, 0, -1):
    for n in range(m, 0, -1):
        print("{} × {} = {}".format(n, m, n * m), end="\t")
    print(end="\n")
